import http from '@/utils/http'
//
/**
 * @params request 请求地址
 * @param '/testIp' 代表vue-cli中config, index.js中配置代理
 */
let request = ''

// post请求add
export function constellationFind(params){
  return http.get(`${request}/manage/api/v2/constellation/find`, params)
}


export function girlfriendAdd(params){
  return http.postForm(`${request}/manage/api/v2/bot/insert`, params)
}

export function girlfriendUpdate(params){
  return http.postForm(`${request}/manage/api/v2/bot/update`, params,'put')
}


export function girlfriendFind(params){
  return http.get(`${request}/manage/api/v2/bot/find/all`)
}

export function girlfriendDelete(id){
  return http.delete(`${request}/manage/api/v2/bot/delete/${id}`)
}
export function girlfriendSelect(id){
  return http.get(`${request}/manage/api/v2/bot/select/${id}`)
}

export function girlPictureDelete(params){
  return http.delete(`${request}/manage/api/v2/bot/picture/delete/${params.BotSha}/${params.ID}`)
}


export function giftAdd(params){
  return http.postForm(`${request}/manage/api/v2/gift/insert`, params)
}
export function giftFind(params){
  return http.get(`${request}/manage/api/v2/gift/find/all`)
}
export function giftUpdate(params){
  return http.postForm(`${request}/manage/api/v2/gift/update`, params,'put')
}

export function giftDelete(data){
  return http.delete(`${request}/manage/api/v2/gift/delete/${data.ID}/${data.Sha}`)
}

export function getUserCountNun(params){
  return http.get(`${request}/manage/api/v2/system/get_user_count`, params)
}
export function getUserCount(params){
  return http.post(`${request}/manage/api/v2/system/select_user_count`, params)
}


export function getIncomeNun(params){
  return http.get(`${request}/manage/api/v2/system/get_total_income`, params)
}
export function getIncome(params){
  return http.post(`${request}/manage/api/v2/system/get_day_income`, params)
}
